//
//  Factory.h
//  CToolBox
//
//  Created by crj on 16/8/4.
//  Copyright © 2016年 oyf. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Factory : NSObject

///*创建一个按钮,标题为白色，带有icon字体 */
//+(UIButton *)btnWithFrame:(CGRect)frame
//                    title:(NSString *)title
//                 iconCode:(NSString *)iconCode
//                   target:(id)target
//                 selector:(SEL)sel;

/*创建一个按钮，标题为白色，标题大小15，背景蓝色，custom按钮类型*/
+(UIButton *)btnWithFrame:(CGRect)frame
                    title:(NSString *)title
                   target:(id)target
                 selector:(SEL)sel;

/*创建一个tag 1000，背景白色 默认键盘所有ASCII码字符 */
+(UITextField *)textFieldWithFrame:(CGRect)frame
                       Placeholder:(NSString *)placeholder
                     ReturnKeyType:(UIReturnKeyType)returnKeyType;


+ (UITableView *)tableViewWithFrame:(CGRect)frame
                           delegate:(id)delegate
                         dataSource:(id)dataSource;

+ (UIView *)viewWithFrame:(CGRect)frame
          backgroundColor:(UIColor *)backgroundColor
                      tag:(NSInteger)tag;

+(UIButton *)btnWithFrame:(CGRect)frame
                     type:(UIButtonType)type
                    title:(NSString *)title
                 fontSize:(CGFloat)fontSize
               titleColor:(UIColor *)titleColor
          backgroundColor:(UIColor *)backgroundColor
                   target:(id)target
                 selector:(SEL)sel;

+(UILabel *)labelWithFram:(CGRect)frame
                     text:(NSString *)text
                 fontSize:(CGFloat)fontSize
                textColor:(UIColor *)textcolor
                    align:(NSTextAlignment)align;

+(UILabel *)labelWithFram:(CGRect)frame
                     text:(NSString *)text
                 fontSize:(CGFloat)fontSize
                textColor:(UIColor *)textcolor
                  bgColor:(UIColor *)bgColor
                    align:(NSTextAlignment)align
                lineSpace:(CGFloat)lineSpace;

+(UITextField *)textFieldWithFrame:(CGRect)frame
                               Tag:(int)tag
                   BackgroundColor:(UIColor *)backgroundColor
                       Placeholder:(NSString *)placeholder
              ClearsOnBeginEditing:(BOOL)clearsOnBeginEditing
                   ClearButtonMode:(UITextFieldViewMode)clearButtonMode
                      KeyboardType:(UIKeyboardType)keyboardType
                     ReturnKeyType:(UIReturnKeyType)returnKeyType
                   SecureTextEntry:(BOOL)secureTextEntry;

+(void)alertMessage:(NSString *)message present:(id)present;

+(void)alertMessageTwoAction:(NSString *)title andMessage:(NSString *)message andAction:(void(^)(UIAlertAction *action))action present:(id)present;

@end
